/****** Object:  Table [dbo].[Meeting]    Script Date: 11/22/2010 19:50:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Meeting](
	[Id] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[Url] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Meeting] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF)
)
GO
/****** Object:  Table [dbo].[Word]    Script Date: 11/22/2010 19:50:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Word](
	[Id] [uniqueidentifier] NOT NULL,
	[Value] [nvarchar](50) NOT NULL,
	[Rating] [int] NOT NULL,
 CONSTRAINT [PK_Word] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF)
)
GO
/****** Object:  Table [dbo].[SessionUser]    Script Date: 11/22/2010 19:50:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SessionUser](
	[Id] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[MeetingId] [uniqueidentifier] NOT NULL,
	[Finished] [bit] NOT NULL,
 CONSTRAINT [PK_SessionUser] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF)
)
GO
/****** Object:  Table [dbo].[BingoWordSet]    Script Date: 11/22/2010 19:50:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BingoWordSet](
	[Id] [uniqueidentifier] NOT NULL,
	[SessionUserId] [uniqueidentifier] NOT NULL,
	[WordId] [uniqueidentifier] NOT NULL,
	[WordPositionX] [int] NOT NULL,
	[WordPositionY] [int] NOT NULL,
	[Checked] [bit] NOT NULL,
 CONSTRAINT [PK_BingoWordSet] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF)
)
GO
/****** Object:  ForeignKey [FK_BingoWordSet_SessionUser]    Script Date: 11/22/2010 19:50:20 ******/
ALTER TABLE [dbo].[BingoWordSet]  WITH CHECK ADD  CONSTRAINT [FK_BingoWordSet_SessionUser] FOREIGN KEY([SessionUserId])
REFERENCES [dbo].[SessionUser] ([Id])
GO
ALTER TABLE [dbo].[BingoWordSet] CHECK CONSTRAINT [FK_BingoWordSet_SessionUser]
GO
/****** Object:  ForeignKey [FK_BingoWordSet_Word]    Script Date: 11/22/2010 19:50:20 ******/
ALTER TABLE [dbo].[BingoWordSet]  WITH CHECK ADD  CONSTRAINT [FK_BingoWordSet_Word] FOREIGN KEY([WordId])
REFERENCES [dbo].[Word] ([Id])
GO
ALTER TABLE [dbo].[BingoWordSet] CHECK CONSTRAINT [FK_BingoWordSet_Word]
GO
/****** Object:  ForeignKey [FK_SessionUser_Meeting]    Script Date: 11/22/2010 19:50:20 ******/
ALTER TABLE [dbo].[SessionUser]  WITH CHECK ADD  CONSTRAINT [FK_SessionUser_Meeting] FOREIGN KEY([MeetingId])
REFERENCES [dbo].[Meeting] ([Id])
GO
ALTER TABLE [dbo].[SessionUser] CHECK CONSTRAINT [FK_SessionUser_Meeting]
GO
